<template>
	<view class="p-2">
		<view class="p-2 bg-white">
			<view class="flex j-start a-center mb-2">
				<view class="text-right col-170">所在仓库：</view>
				<view class="flex-1">{{detailInfo.warehouseName}}</view>
			</view>
			<view class="flex j-start a-center mb-2">
				<view class="text-right col-170">商品编码：</view>
				<view class="mr-2 flex-1">{{detailInfo.productCode}}</view>
				<image src="@/static/images/fuzhi.png" mode="widthFix" class="svgmini"
					@click="utils.setClipboardData(detailInfo.productCode)"></image>
			</view>
			<view class="flex j-start a-center mb-2">
				<view class="text-right col-170">手机型号：</view>
				<view class="flex-1">{{detailInfo.model?detailInfo.model:'--'}}</view>
			</view>
			<view class="flex j-start a-center mb-2">
				<view class="text-right col-170">手机品牌：</view>
				<view class="flex-1">{{detailInfo.brand}}</view>
			</view>
			<view class="flex j-start a-center mb-2">
				<view class="text-right col-170">内存：</view>
				<view class="flex-1">{{detailInfo.memory?detailInfo.memory:'--'}}G</view>
			</view>
			<view class="flex j-start a-center mb-2">
				<view class="text-right col-170">颜色：</view>
				<view class="flex-1">{{detailInfo.colour?detailInfo.colour:'--'}}</view>
			</view>
			<view class="flex j-start a-center mb-2">
				<view class="text-right col-170">库龄：</view>
				<view class="flex-1">{{detailInfo.storageAge?detailInfo.storageAge:'--'}}</view>
			</view>
			<view class="flex j-start a-center mb-2">
				<view class="text-right col-170">成本价：</view>
				<view class="flex-1">{{detailInfo.costPrice}}</view>
			</view>
			<u-gap height="1" bgColor="#eaeaea" marginTop="26rpx" marginBottom="26rpx"></u-gap>

			<view class="flex j-start a-center mb-2">
				<view class="text-secondary text-right col-170">IMEI：</view>
				<view class="flex-1">{{detailInfo.imei?detailInfo.imei:'--'}}</view>
				<image src="@/static/images/fuzhi.png" mode="widthFix" class="svgmini"
					@click="utils.setClipboardData(detailInfo.imei)"></image>
			</view>
			<view class="flex j-start a-center mb-3">
				<view class="text-secondary text-right col-170">参数：</view>
				<view class="flex-1">{{detailInfo.colour?detailInfo.colour:'--'}} ，
					{{detailInfo.memory?detailInfo.memory:'--'}}G ，{{detailInfo.network?detailInfo.network:'--'}}</view>
			</view>
			<view class="flex j-start mb-3">
				<view class="text-secondary text-right col-170">机况：</view>
				<view class="flex-1">{{detailInfo.subrackDesc?detailInfo.subrackDesc:'--'}}</view>
			</view>
			<view class="flex j-start mb-3">
				<view class="text-secondary text-right col-170">机况类型：</view>
				<view class="flex-1">{{detailInfo.conditionTypeName?detailInfo.conditionTypeName:'--'}}</view>
			</view>
			<!-- <view>
				<image-preview :src="detailInfo.reportImg" :multiple="true" width="660rpx" height="auto" mode="widthFix" />
			</view> -->

		</view>



	</view>
</template>

<script>
	import {
		itLibraryDetails
	} from '@/common/api/itLibrary.js'
	export default {
		name: "productDetail",
		mixins: [],
		data() {
			return {
				productCode: '',
				detailInfo: {}
			}
		},
		onLoad(option) {
			if (option.productCode) {
				this.productCode = option.productCode;
				this.getData();
			}

		},
		watch: {},
		computed: {},
		methods: {
			getData() {
				itLibraryDetails({
					productCode: this.productCode
				}).then(res => {
					this.detailInfo = res.data;
					uni.setNavigationBarTitle({
						title: res.data.model
					});

				})
			},

		}
	}
</script>

<style lang="scss">
</style>